#include "calPrms.h"
#include "rtwtypes.h"
#include "multiword_types.h"
#include "bms_Slave_types.h"

#pragma SEC(CALPRM)

const volatile boolean_T Balance_ON_Off_First[32] = { true, false, false, false,
  true, false, false, false, true, false, false, false, true, false, false,
  false, true, false, false, false, true, false, false, false, true, false,
  false, false, true, false, false, false } ;

const volatile boolean_T Balance_ON_Off_Forth[32] = { false, false, false, true,
  false, false, false, true, false, true, false, false, false, false, false,
  true, false, false, false, true, false, true, false, false, false, false,
  false, true, false, false, false, true } ;

const volatile boolean_T Balance_ON_Off_Second[32] = { false, true, false, false,
  false, true, false, false, false, false, true, false, false, true, false,
  false, false, true, false, false, false, false, true, false, false, true,
  false, false, false, true, false, false } ;

const volatile boolean_T Balance_ON_Off_Third[32] = { false, false, true, false,
  false, false, true, false, false, false, false, true, false, false, true,
  false, false, false, true, false, false, false, false, true, false, false,
  true, false, false, false, true, false } ;

const volatile uint32_T Bat_Con = 30000U;
const volatile uint8_T Battery_ID[19] = { 84U, 72U, 70U, 49U, 48U, 53U, 53U, 48U,
  53U, 56U, 83U, 51U, 54U, 49U, 48U, 48U, 49U, 0U, 0U } ;

const volatile uint8_T Battery_type = 1U;
const volatile int16_T CCV_CellT[6] = { 10, 15, 25, 35, 45, 55 } ;

const volatile uint8_T CCV_SOC[3] = { 95U, 99U, 100U } ;

const volatile uint16_T CCV_Vol[18] = { 4255U, 4250U, 4248U, 4246U, 4244U, 4242U,
  4280U, 4275U, 4275U, 4270U, 4270U, 4270U, 4300U, 4300U, 4300U, 4300U, 4300U,
  4300U } ;

const volatile uint16_T CELLV_REFMAX = 4350U;
const volatile int16_T Capacity_Keep_CellT[9] = { -30, -20, -10, 0, 10, 25, 35,
  45, 55 } ;

const volatile real32_T Capacity_Keep_Factor[9] = { 0.65F, 0.7F, 0.8F, 0.9F,
  0.95F, 1.0F, 1.0F, 1.0F, 1.0F } ;

const volatile uint16_T Capacity_Rate = 56U;
const volatile real32_T CellC_C[3] = { 0.1F, 0.33F, 1.0F } ;

const volatile int16_T CellC_T[11] = { -30, -20, -10, -5, 0, 5, 10, 25, 40, 45,
  55 } ;

const volatile uint32_T CellT_AD_100K[332] = { 506U, 517U, 518U, 529U, 530U,
  541U, 542U, 553U, 554U, 566U, 567U, 580U, 581U, 594U, 595U, 608U, 609U, 622U,
  623U, 638U, 639U, 653U, 654U, 669U, 670U, 686U, 687U, 703U, 704U, 721U, 722U,
  740U, 741U, 759U, 760U, 778U, 779U, 798U, 799U, 819U, 820U, 841U, 842U, 863U,
  864U, 886U, 887U, 909U, 910U, 934U, 935U, 959U, 960U, 985U, 986U, 1012U, 1013U,
  1039U, 1040U, 1068U, 1069U, 1097U, 1098U, 1128U, 1129U, 1159U, 1160U, 1191U,
  1192U, 1225U, 1226U, 1259U, 1260U, 1295U, 1296U, 1331U, 1332U, 1369U, 1370U,
  1408U, 1409U, 1449U, 1450U, 1490U, 1491U, 1533U, 1534U, 1578U, 1579U, 1624U,
  1625U, 1671U, 1672U, 1720U, 1721U, 1771U, 1772U, 1823U, 1824U, 1877U, 1878U,
  1933U, 1934U, 1991U, 1992U, 2051U, 2052U, 2113U, 2114U, 2177U, 2178U, 2243U,
  2244U, 2312U, 2313U, 2383U, 2384U, 2457U, 2458U, 2533U, 2534U, 2612U, 2613U,
  2694U, 2695U, 2779U, 2780U, 2867U, 2868U, 2958U, 2959U, 3053U, 3054U, 3151U,
  3152U, 3253U, 3254U, 3359U, 3360U, 3468U, 3469U, 3582U, 3583U, 3701U, 3702U,
  3824U, 3825U, 3951U, 3952U, 4084U, 4085U, 4222U, 4223U, 4366U, 4367U, 4515U,
  4516U, 4670U, 4671U, 4831U, 4832U, 4999U, 5000U, 5174U, 5175U, 5355U, 5356U,
  5544U, 5545U, 5741U, 5742U, 5946U, 5947U, 6160U, 6161U, 6382U, 6383U, 6613U,
  6614U, 6854U, 6855U, 7105U, 7106U, 7367U, 7368U, 7639U, 7640U, 7923U, 7924U,
  8219U, 8220U, 8528U, 8529U, 8850U, 8851U, 9185U, 9186U, 9534U, 9535U, 9899U,
  9900U, 10269U, 10270U, 10659U, 10660U, 11069U, 11070U, 11489U, 11490U, 11929U,
  11930U, 12379U, 12380U, 12859U, 12860U, 13359U, 13360U, 13879U, 13880U, 14419U,
  14420U, 14989U, 14990U, 15579U, 15580U, 16189U, 16190U, 16829U, 16830U, 17499U,
  17500U, 18199U, 18200U, 18929U, 18930U, 19689U, 19690U, 20479U, 20480U, 21309U,
  21310U, 22179U, 22180U, 23079U, 23080U, 24019U, 24020U, 25009U, 25010U, 26039U,
  26040U, 27119U, 27120U, 28249U, 28250U, 29429U, 29430U, 30659U, 30660U, 31949U,
  31950U, 33299U, 33300U, 34709U, 34710U, 36189U, 36190U, 37739U, 37740U, 39359U,
  39360U, 41059U, 41060U, 42849U, 42850U, 44719U, 44720U, 46679U, 46680U, 48739U,
  48740U, 50899U, 50900U, 53179U, 53180U, 55569U, 55570U, 58079U, 58080U, 60719U,
  60720U, 63499U, 63500U, 66429U, 66430U, 69519U, 69520U, 72769U, 72770U, 76189U,
  76190U, 79809U, 79810U, 83629U, 83630U, 87659U, 87660U, 91919U, 91920U, 96429U,
  96430U, 101189U, 101190U, 106229U, 106230U, 111569U, 111570U, 117229U, 117230U,
  123219U, 123220U, 129579U, 129580U, 136319U, 136320U, 143469U, 143470U,
  151069U, 151070U, 159139U, 159140U, 171720U } ;

const volatile uint32_T CellT_AD_10K[332] = { 506U, 517U, 518U, 529U, 530U, 541U,
  542U, 553U, 554U, 566U, 567U, 580U, 581U, 594U, 595U, 608U, 609U, 622U, 623U,
  638U, 639U, 653U, 654U, 669U, 670U, 686U, 687U, 703U, 704U, 721U, 722U, 740U,
  741U, 759U, 760U, 778U, 779U, 798U, 799U, 819U, 820U, 841U, 842U, 863U, 864U,
  886U, 887U, 909U, 910U, 934U, 935U, 959U, 960U, 985U, 986U, 1012U, 1013U,
  1039U, 1040U, 1068U, 1069U, 1097U, 1098U, 1128U, 1129U, 1159U, 1160U, 1191U,
  1192U, 1225U, 1226U, 1259U, 1260U, 1295U, 1296U, 1331U, 1332U, 1369U, 1370U,
  1408U, 1409U, 1449U, 1450U, 1490U, 1491U, 1533U, 1534U, 1578U, 1579U, 1624U,
  1625U, 1671U, 1672U, 1720U, 1721U, 1771U, 1772U, 1823U, 1824U, 1877U, 1878U,
  1933U, 1934U, 1991U, 1992U, 2051U, 2052U, 2113U, 2114U, 2177U, 2178U, 2243U,
  2244U, 2312U, 2313U, 2383U, 2384U, 2457U, 2458U, 2533U, 2534U, 2612U, 2613U,
  2694U, 2695U, 2779U, 2780U, 2867U, 2868U, 2958U, 2959U, 3053U, 3054U, 3151U,
  3152U, 3253U, 3254U, 3359U, 3360U, 3468U, 3469U, 3582U, 3583U, 3701U, 3702U,
  3824U, 3825U, 3951U, 3952U, 4084U, 4085U, 4222U, 4223U, 4366U, 4367U, 4515U,
  4516U, 4670U, 4671U, 4831U, 4832U, 4999U, 5000U, 5174U, 5175U, 5355U, 5356U,
  5544U, 5545U, 5741U, 5742U, 5946U, 5947U, 6160U, 6161U, 6382U, 6383U, 6613U,
  6614U, 6854U, 6855U, 7105U, 7106U, 7367U, 7368U, 7639U, 7640U, 7923U, 7924U,
  8219U, 8220U, 8528U, 8529U, 8850U, 8851U, 9185U, 9186U, 9534U, 9535U, 9899U,
  9900U, 10269U, 10270U, 10659U, 10660U, 11069U, 11070U, 11489U, 11490U, 11929U,
  11930U, 12379U, 12380U, 12859U, 12860U, 13359U, 13360U, 13879U, 13880U, 14419U,
  14420U, 14989U, 14990U, 15579U, 15580U, 16189U, 16190U, 16829U, 16830U, 17499U,
  17500U, 18199U, 18200U, 18929U, 18930U, 19689U, 19690U, 20479U, 20480U, 21309U,
  21310U, 22179U, 22180U, 23079U, 23080U, 24019U, 24020U, 25009U, 25010U, 26039U,
  26040U, 27119U, 27120U, 28249U, 28250U, 29429U, 29430U, 30659U, 30660U, 31949U,
  31950U, 33299U, 33300U, 34709U, 34710U, 36189U, 36190U, 37739U, 37740U, 39359U,
  39360U, 41059U, 41060U, 42849U, 42850U, 44719U, 44720U, 46679U, 46680U, 48739U,
  48740U, 50899U, 50900U, 53179U, 53180U, 55569U, 55570U, 58079U, 58080U, 60719U,
  60720U, 63499U, 63500U, 66429U, 66430U, 69519U, 69520U, 72769U, 72770U, 76189U,
  76190U, 79809U, 79810U, 83629U, 83630U, 87659U, 87660U, 91919U, 91920U, 96429U,
  96430U, 101189U, 101190U, 106229U, 106230U, 111569U, 111570U, 117229U, 117230U,
  123219U, 123220U, 129579U, 129580U, 136319U, 136320U, 143469U, 143470U,
  151069U, 151070U, 159139U, 159140U, 171720U } ;

const volatile uint8_T CellT_AD_Type = 0U;
const volatile uint8_T CellT_Channel_Connect[10] = { 1U, 1U, 1U, 0U, 0U, 0U, 0U,
  0U, 0U, 0U } ;

const volatile int16_T CellT_DiffRec_LV1 = 17;
const volatile int16_T CellT_Diff_LV1 = 20;
const volatile int16_T CellT_LowRec_LV1 = -17;
const volatile int16_T CellT_Low_LV1 = -20;
const volatile int16_T CellT_Low_LV3 = -40;
const volatile int16_T CellT_OCV[4] = { -20, 0, 10, 25 } ;

const volatile int16_T CellT_OverRec_LV1 = 45;
const volatile int16_T CellT_OverRec_LV2 = 50;
const volatile int16_T CellT_OverRec_LV3 = 53;
const volatile int16_T CellT_Over_LV1 = 50;
const volatile int16_T CellT_Over_LV2 = 53;
const volatile int16_T CellT_Over_LV3 = 55;
const volatile int16_T CellT_SOP[9] = { 0, 30, 40, 55, 56, 57, 58, 59, 60 } ;

const volatile int16_T CellT_Table[332] = { 125, 125, 124, 124, 123, 123, 122,
  122, 121, 121, 120, 120, 119, 119, 118, 118, 117, 117, 116, 116, 115, 115, 114,
  114, 113, 113, 112, 112, 111, 111, 110, 110, 109, 109, 108, 108, 107, 107, 106,
  106, 105, 105, 104, 104, 103, 103, 102, 102, 101, 101, 100, 100, 99, 99, 98,
  98, 97, 97, 96, 96, 95, 95, 94, 94, 93, 93, 92, 92, 91, 91, 90, 90, 89, 89, 88,
  88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 81, 81, 80, 80, 79, 79, 78,
  78, 77, 77, 76, 76, 75, 75, 74, 74, 73, 73, 72, 72, 71, 71, 70, 70, 69, 69, 68,
  68, 67, 67, 66, 66, 65, 65, 64, 64, 63, 63, 62, 62, 61, 61, 60, 60, 59, 59, 58,
  58, 57, 57, 56, 56, 55, 55, 54, 54, 53, 53, 52, 52, 51, 51, 50, 50, 49, 49, 48,
  48, 47, 47, 46, 46, 45, 45, 44, 44, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 38,
  38, 37, 37, 36, 36, 35, 35, 34, 34, 33, 33, 32, 32, 31, 31, 30, 30, 29, 29, 28,
  28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18,
  18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8,
  7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4,
  -5, -5, -6, -6, -7, -7, -8, -8, -9, -9, -10, -10, -11, -11, -12, -12, -13, -13,
  -14, -14, -15, -15, -16, -16, -17, -17, -18, -18, -19, -19, -20, -20, -21, -21,
  -22, -22, -23, -23, -24, -24, -25, -25, -26, -26, -27, -27, -28, -28, -29, -29,
  -30, -30, -31, -31, -32, -32, -33, -33, -34, -34, -35, -35, -36, -36, -37, -37,
  -38, -38, -39, -39, -40, -40 } ;

const volatile uint32_T CellT_Temp_AD_R = 10000U;
const volatile uint8_T CellT_num = 6U;
const volatile uint16_T CellV_ChargBack = 3300U;
const volatile uint16_T CellV_DiffRec_LV1 = 550U;
const volatile uint16_T CellV_DiffRec_LV1_Below10 = 550U;
const volatile uint16_T CellV_DiffRec_LV2 = 200U;
const volatile uint16_T CellV_DiffRec_LV2_Below10 = 200U;
const volatile uint16_T CellV_Diff_LV1 = 600U;
const volatile uint16_T CellV_Diff_LV1_Below10 = 600U;
const volatile uint16_T CellV_Diff_LV2 = 800U;
const volatile uint16_T CellV_Diff_LV2_Below10 = 800U;
const volatile uint16_T CellV_LowRec_LV1_NormalUp = 3250U;
const volatile uint16_T CellV_LowRec_LV1_TenUp = 3250U;
const volatile uint16_T CellV_LowRec_LV1_ZeroBelow = 3250U;
const volatile uint16_T CellV_LowRec_LV1_ZeroUp = 3250U;
const volatile uint16_T CellV_LowRec_LV2_NormalUp = 3150U;
const volatile uint16_T CellV_LowRec_LV2_TenUp = 3150U;
const volatile uint16_T CellV_LowRec_LV2_ZeroBelow = 3150U;
const volatile uint16_T CellV_LowRec_LV2_ZeroUp = 3150U;
const volatile uint16_T CellV_LowRec_LV3_NormalUp = 3050U;
const volatile uint16_T CellV_LowRec_LV3_TenUp = 3050U;
const volatile uint16_T CellV_LowRec_LV3_ZeroBelow = 3050U;
const volatile uint16_T CellV_LowRec_LV3_ZeroUp = 3050U;
const volatile uint16_T CellV_Low_LV1_NormalUp = 3200U;
const volatile uint16_T CellV_Low_LV1_TenUp = 3200U;
const volatile uint16_T CellV_Low_LV1_ZeroBelow = 3200U;
const volatile uint16_T CellV_Low_LV1_ZeroUp = 3200U;
const volatile uint16_T CellV_Low_LV2_NormalUp = 3100U;
const volatile uint16_T CellV_Low_LV2_TenUp = 3100U;
const volatile uint16_T CellV_Low_LV2_ZeroBelow = 3100U;
const volatile uint16_T CellV_Low_LV2_ZeroUp = 3100U;
const volatile uint16_T CellV_Low_LV3_NormalUp = 3000U;
const volatile uint16_T CellV_Low_LV3_TenUp = 3000U;
const volatile uint16_T CellV_Low_LV3_ZeroBelow = 3000U;
const volatile uint16_T CellV_Low_LV3_ZeroUp = 3000U;
const volatile int16_T CellV_Low_Temp_Divid_Zero = 0;
const volatile int16_T CellV_Low_Temp_Normal = 25;
const volatile int16_T CellV_Low_Temp_Ten = 10;
const volatile uint16_T CellV_Max_Con = 4300U;
const volatile uint16_T CellV_Min_Con = 500U;
const volatile uint16_T CellV_NeverBack = 3800U;
const volatile uint16_T CellV_OverRec_LV1 = 4290U;
const volatile uint16_T CellV_OverRec_LV2 = 4300U;
const volatile uint16_T CellV_OverRec_LV3 = 4310U;
const volatile uint16_T CellV_Over_LV1 = 4300U;
const volatile uint16_T CellV_Over_LV2 = 4310U;
const volatile uint16_T CellV_Over_LV3 = 4320U;
const volatile uint16_T CellV_Rate = 3690U;
const volatile uint16_T CellV_Rechrg_limit = 4250U;
const volatile uint16_T CellV_SOP[12] = { 3000U, 3100U, 3200U, 3300U, 3400U,
  3500U, 4150U, 4180U, 4200U, 4220U, 4250U, 4300U } ;

const volatile uint16_T CellV_Sensor_High_Coff = 4800U;
const volatile uint16_T CellV_Sensor_Low_Coff = 250U;
const volatile uint8_T CellV_UV_Th = 25U;
const volatile uint16_T CellV_limit = 4300U;
const volatile uint8_T CellV_num = 15U;
const volatile uint16_T Cell_BalCirc_Almtime = 1000U;
const volatile real32_T Cell_Capacity[33] = { 1.5601F, 1.3423F, 1.2048F, 1.1521F,
  1.1123F, 1.0741F, 1.0616F, 1.0F, 1.0F, 1.0F, 1.0F, 1.5873F, 1.4006F, 1.2594F,
  1.2005F, 1.1507F, 1.1038F, 1.0858F, 1.0F, 1.0F, 1.0F, 1.0F, 1.3193F, 1.2674F,
  1.2121F, 1.1765F, 1.1481F, 1.1086F, 1.0917F, 1.0F, 1.0F, 1.0F, 1.0F } ;

const volatile uint16_T Cell_LostV_Almtime = 500U;
const volatile uint16_T Cell_LostV_Rcvtime = 1U;
const volatile uint16_T Cell_OverDiffV1_Almtime = 500U;
const volatile uint16_T Cell_OverDiffV1_Rcvtime = 500U;
const volatile uint16_T Cell_OverDiffV2_Almtime = 500U;
const volatile uint16_T Cell_OverDiffV2_Rcvtime = 500U;
const volatile uint16_T Cell_OverT1_Almtime = 400U;
const volatile uint16_T Cell_OverT1_Rcvtime = 400U;
const volatile uint16_T Cell_OverT2_Almtime = 400U;
const volatile uint16_T Cell_OverT2_Rcvtime = 400U;
const volatile uint16_T Cell_OverT3_Almtime = 400U;
const volatile uint16_T Cell_OverT3_Rcvtime = 400U;
const volatile uint16_T Cell_OverV1_Almtime = 500U;
const volatile uint16_T Cell_OverV1_Rcvtime = 500U;
const volatile uint16_T Cell_OverV2_Almtime = 500U;
const volatile uint16_T Cell_OverV2_Rcvtime = 500U;
const volatile uint16_T Cell_OverV3_Almtime = 500U;
const volatile uint16_T Cell_OverV3_Rcvtime = 500U;
const volatile uint16_T Cell_PCBTover_Almtime = 500U;
const volatile uint16_T Cell_PCBTover_Rcvtime = 500U;
const volatile uint16_T Cell_SensorT1_Almtime = 2000U;
const volatile uint16_T Cell_SensorT1_Rcvtime = 1U;
const volatile uint16_T Cell_SensorT2_Almtime = 2000U;
const volatile uint16_T Cell_SensorT2_Rcvtime = 1U;
const volatile uint16_T Cell_SensorV_Almtime = 500U;
const volatile uint16_T Cell_SensorV_Rcvtime = 1U;
const volatile uint16_T Cell_StrayT_Almtime = 2000U;
const volatile uint16_T Cell_StrayT_Rcvtime = 1U;
const volatile uint16_T Cell_TDiff_Almtime = 6000U;
const volatile uint16_T Cell_TDiff_Rcvtime = 400U;
const volatile int16_T Cell_ThresholdTemp = 55;
const volatile uint16_T Cell_UnderT_Almtime = 400U;
const volatile uint16_T Cell_UnderT_Rcvtime = 400U;
const volatile uint16_T Cell_UnderV1_Almtime = 500U;
const volatile uint16_T Cell_UnderV1_Rcvtime = 500U;
const volatile uint16_T Cell_UnderV2_Almtime = 500U;
const volatile uint16_T Cell_UnderV2_Rcvtime = 500U;
const volatile uint16_T Cell_UnderV3_Almtime = 500U;
const volatile uint16_T Cell_UnderV3_Rcvtime = 500U;
const volatile int16_T Cell_maxTemp = 50;
const volatile int16_T Cell_minTemp = 10;
const volatile uint8_T Channel_Connect[32] = { 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U,
  1U, 1U, 1U, 1U, 1U, 1U, 1U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U,
  0U, 0U, 0U, 0U } ;

const volatile uint8_T Chip_num = 2U;
const volatile uint16_T Con_Time = 1000U;
const volatile uint8_T Contious_Power_Chrg[48] = { 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U } ;

const volatile uint8_T Contious_Power_DisChrg[54] = { 0U, 0U, 0U, 0U, 0U, 0U, 0U,
  0U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U } ;

const volatile uint16_T Correct_Time = 128U;
const volatile uint16_T Cycle_NUM[32] = { 0U, 50U, 100U, 150U, 200U, 250U, 300U,
  350U, 400U, 450U, 500U, 550U, 600U, 650U, 700U, 750U, 800U, 850U, 900U, 950U,
  1000U, 1050U, 1100U, 1150U, 1200U, 1250U, 1300U, 1350U, 1400U, 1450U, 1500U,
  1550U } ;

const volatile int16_T DCV_CellT[10] = { -30, -20, -10, 0, 11, 15, 25, 35, 45,
  55 } ;

const volatile uint8_T DCV_SOC[3] = { 0U, 5U, 10U } ;

const volatile uint16_T DCV_Vol[30] = { 2500U, 2500U, 2500U, 2650U, 2750U, 2750U,
  3000U, 3000U, 3000U, 3000U, 3000U, 3000U, 3000U, 3150U, 3250U, 3250U, 3300U,
  3300U, 3300U, 3300U, 3200U, 3200U, 3200U, 3300U, 3350U, 3350U, 3500U, 3500U,
  3500U, 3500U } ;

const volatile uint8_T DC_Chrg_CC[135] = { 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U,
  0U, 0U, 0U, 0U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U,
  0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U } ;

const volatile uint16_T DC_Chrg_CellV[15] = { 3000U, 3300U, 3750U, 3800U, 3850U,
  3900U, 3950U, 4000U, 4050U, 4100U, 4150U, 4200U, 4250U, 4290U, 4295U } ;

const volatile int16_T DC_Chrg_Temp[9] = { -6, -5, 0, 5, 10, 20, 40, 50, 55 } ;

const volatile real32_T DOD = 0.98F;
const volatile real32_T Factor_LowVol = 11.0F;
const volatile uint8_T Manu_code = 1U;
const volatile uint8_T Max_Mileage = 100U;
const volatile uint16_T OCV_Correct_CellV = 4350U;
const volatile uint8_T OCV_SOC[11] = { 0U, 10U, 20U, 30U, 40U, 50U, 60U, 70U,
  80U, 90U, 100U } ;

const volatile uint16_T OCV_Table[44] = { 3440U, 3520U, 3590U, 3630U, 3660U,
  3730U, 3840U, 3950U, 4070U, 4170U, 4310U, 3440U, 3520U, 3590U, 3630U, 3660U,
  3730U, 3840U, 3950U, 4070U, 4170U, 4310U, 3440U, 3520U, 3590U, 3630U, 3660U,
  3730U, 3840U, 3950U, 4070U, 4170U, 4310U, 3440U, 3520U, 3590U, 3630U, 3660U,
  3730U, 3840U, 3950U, 4070U, 4170U, 4310U } ;

const volatile boolean_T OFF[32] = { false, false, false, false, false, false,
  false, false, false, false, false, false, false, false, false, false, false,
  false, false, false, false, false, false, false, false, false, false, false,
  false, false, false, false } ;

const volatile uint16_T Other_CellSOCDiff_Almtime = 200U;
const volatile uint16_T Other_Low1SOH_Almtime = 200U;
const volatile uint16_T Other_Low2SOH_Almtime = 200U;
const volatile uint16_T Other_LowSOC_Almtime = 200U;
const volatile uint16_T Other_OverSOC_Almtime = 400U;
const volatile uint16_T Other_SOCJump_Almtime = 200U;
const volatile uint16_T Other_SnsrInvalid_Almtime = 200U;
const volatile uint16_T Other_SnsrInvalid_Rcvtime = 200U;
const volatile uint16_T Other_VCURepTmt6_Almtime = 200U;
const volatile uint16_T Other_VCURepTmt7_Almtime = 200U;
const volatile uint16_T OverCur_Chrg1_Almtime = 1000U;
const volatile uint16_T OverCur_Chrg1_Rcvtime = 1000U;
const volatile uint16_T OverCur_Chrg2_Almtime = 1000U;
const volatile uint16_T OverCur_Chrg2_Rcvtime = 1000U;
const volatile uint16_T OverCur_Chrg3_Almtime = 1000U;
const volatile uint16_T OverCur_Chrg3_Rcvtime = 1000U;
const volatile uint16_T OverCur_DisChrg1_Almtime = 1000U;
const volatile uint16_T OverCur_DisChrg1_Rcvtime = 1000U;
const volatile uint16_T OverCur_DisChrg2_Almtime = 1000U;
const volatile uint16_T OverCur_DisChrg2_Rcvtime = 1000U;
const volatile uint16_T OverCur_DisChrg3_Almtime = 1000U;
const volatile uint16_T OverCur_DisChrg3_Rcvtime = 1000U;
const volatile uint16_T OverCur_ReChrg1_Almtime = 1000U;
const volatile uint16_T OverCur_ReChrg1_Rcvtime = 1000U;
const volatile uint16_T OverCur_ReChrg2_Almtime = 1000U;
const volatile uint16_T OverCur_ReChrg2_Rcvtime = 1000U;
const volatile uint16_T OverCur_ReChrg3_Almtime = 1000U;
const volatile uint16_T OverCur_ReChrg3_Rcvtime = 1000U;
const volatile uint16_T PACK_ID_AD_R = 51000U;
const volatile int16_T PCB_OverTemp = 110;
const volatile int16_T PCB_OverTempRec = 100;
const volatile int16_T PCB_TempRec_Balance = 90;
const volatile int16_T PCB_maxTemp = 100;
const volatile int16_T PCB_minTemp = -40;
const volatile uint32_T Pack_AD_Param[19] = { 0U, 2999U, 3000U, 9300U, 9301U,
  17500U, 17501U, 27500U, 27501U, 42000U, 42001U, 63000U, 63001U, 97500U, 97501U,
  160000U, 160001U, 240000U, 240001U } ;

const volatile uint8_T Pack_ID_CAL[19] = { 0U, 0U, 1U, 1U, 2U, 2U, 3U, 3U, 4U,
  4U, 5U, 5U, 6U, 6U, 7U, 7U, 8U, 8U, 16U } ;

const volatile uint16_T Pul_Time = 1000U;
const volatile uint8_T Pulse_Power_Chrg[48] = { 0U, 60U, 60U, 60U, 60U, 60U, 60U,
  0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U,
  0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U,
  0U, 0U, 0U, 0U, 0U, 0U, 0U } ;

const volatile uint8_T Pulse_Power_DisChrg[54] = { 0U, 0U, 0U, 0U, 0U, 0U, 0U,
  0U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U,
  60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U } ;

const volatile uint16_T SOC_0_ConfirmTime = 2000U;
const volatile uint16_T SOC_0_RcvTime = 1U;
const volatile uint16_T SOC_10_ConfirmTime = 4000U;
const volatile uint16_T SOC_10_RcvTime = 1U;
const volatile uint16_T SOC_95_ConfirmTime = 500U;
const volatile uint16_T SOC_95_RcvTime = 1U;
const volatile uint16_T SOC_99_ConfirmTime = 500U;
const volatile uint16_T SOC_99_RcvTime = 1U;
const volatile real32_T SOC_CAL = 100.0F;
const volatile real32_T SOC_CAL_DC = 100.0F;
const volatile real32_T SOC_CAP = 58.0F;
const volatile uint8_T SOC_ConChrg[6] = { 0U, 40U, 60U, 80U, 90U, 95U } ;

const volatile uint8_T SOC_ConDisChrg[6] = { 0U, 5U, 10U, 20U, 30U, 50U } ;

const volatile real32_T SOC_Factor = 1.1123F;
const volatile real32_T SOC_Keep_C[5] = { 0.1F, 0.2F, 0.33F, 0.5F, 1.0F } ;

const volatile int16_T SOC_Keep_T[6] = { 0, 10, 25, 35, 45, 55 } ;

const volatile uint16_T SOC_Keep_Vol[30] = { 4240U, 4245U, 4250U, 4259U, 4265U,
  4238U, 4244U, 4250U, 4255U, 4260U, 4236U, 4240U, 4245U, 4250U, 4255U, 4233U,
  4238U, 4243U, 4246U, 4252U, 4230U, 4236U, 4240U, 4240U, 4245U, 4228U, 4234U,
  4238U, 4238U, 4240U } ;

const volatile uint8_T SOC_OffSet = 7U;
const volatile uint8_T SOC_PuChrg[6] = { 0U, 40U, 60U, 80U, 90U, 95U } ;

const volatile uint8_T SOC_PuDisChrg[6] = { 0U, 5U, 10U, 20U, 30U, 50U } ;

const volatile real32_T SOC_ReChrg = 97.0F;
const volatile uint8_T SOC_ThirtySecChrg[6] = { 0U, 40U, 60U, 80U, 90U, 95U } ;

const volatile uint8_T SOC_ThirtySecDisChrg[6] = { 0U, 5U, 10U, 20U, 30U, 50U } ;

const volatile uint8_T SOH_CAL[32] = { 100U, 99U, 98U, 97U, 96U, 96U, 95U, 95U,
  94U, 94U, 93U, 93U, 93U, 92U, 92U, 92U, 91U, 90U, 90U, 90U, 90U, 90U, 89U, 89U,
  88U, 88U, 88U, 88U, 88U, 88U, 87U, 87U } ;

const volatile uint8_T SOP_Chrg_Current[12] = { 100U, 100U, 100U, 100U, 100U,
  100U, 100U, 80U, 60U, 40U, 20U, 0U } ;

const volatile uint8_T SOP_DisChrg[12] = { 0U, 20U, 40U, 60U, 80U, 100U, 100U,
  100U, 100U, 100U, 100U, 100U } ;

const volatile uint8_T SOP_DisChrg_CellTLimit[9] = { 100U, 100U, 100U, 100U, 90U,
  80U, 70U, 60U, 50U } ;

const volatile int32_T Static_Current = 17;
const volatile uint16_T Step_Vol = 2000U;
const volatile int16_T Temp_ConChrg[8] = { -11, -10, 5, 10, 20, 40, 50, 55 } ;

const volatile int16_T Temp_ConDisChrg[9] = { -21, -20, -15, -5, 10, 20, 40, 50,
  55 } ;

const volatile int16_T Temp_PuChrg[8] = { -11, -10, 5, 10, 20, 40, 50, 55 } ;

const volatile int16_T Temp_PuDisChrg[9] = { -21, -20, -15, -5, 10, 20, 40, 50,
  55 } ;

const volatile int16_T Temp_ThirtySecChrg[8] = { -11, -10, 5, 10, 20, 40, 50, 55
} ;

const volatile int16_T Temp_ThirtySecDisChrg[9] = { -21, -20, -15, -5, 10, 20,
  40, 50, 55 } ;

const volatile uint8_T Tempnum2chip = 3U;
const volatile uint16_T ThirtySec_Power_Chrg[48] = { 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U,
  60U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U } ;

const volatile uint16_T ThirtySec_Power_DisChrg[54] = { 0U, 0U, 0U, 0U, 0U, 0U,
  0U, 0U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U,
  60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U,
  60U, 60U, 60U, 60U, 60U, 0U, 0U, 60U, 60U, 60U, 60U, 60U, 60U, 60U, 0U } ;

const volatile uint16_T Threshold_DiffVoltage = 10U;
const volatile uint16_T correct_CountSOC = 200U;
const volatile uint16_T correct_CountSOC_Time = 30U;

#pragma SEC()

